
import { type IComponentConfig, ChannelEnum } from '../../types'

const props: IComponentConfig[] = [{
  type: 'inputNumber',
  component: 'eInputNumber',
  label: '最大值',
  model: 'max',
  defaultValue: Infinity
}, {
  type: 'inputNumber',
  component: 'eInputNumber',
  label: '最小值',
  model: 'min',
  defaultValue: -Infinity
}, {
  type: 'inputNumber',
  component: 'eInputNumber',
  label: '每次改变的步伐',
  model: 'step',
  defaultValue: 1
}, {
  type: 'switch',
  component: 'eSwitch',
  label: '是否禁用',
  model: 'disabled',
  defaultValue: false
}, {
  type: 'input',
  component: 'eInput',
  label: '占位文本',
  model: 'placeholder',
  defaultValue: '请输入'
}, {
  type: 'inputNumber',
  component: 'eInputNumber',
  label: '数值精度',
  model: 'precision',
  defaultValue: null
}]

const events: IComponentConfig[] = [{
  type: 'codeEditor',
  component: 'CodeEditor',
  model: 'on-change',
  label: 'onChange',
  defaultValue: `function fn() {

}
  `
}]

const drag = {
  compName: 'eInputNumber',
  label: '数字输入框',
  classify: {
    label: '基础',
    value: 'basic'
  },
  channel: ChannelEnum.PC,
  group: {
    label: '表单',
    value: 'form'
  },
  icon: 'icon-InputNumber'
}

export default {
  drag,
  props,
  events
}
